#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <assert.h>
#include <compl.h>
#include <dinfra/init_fin.h>

#include <pthreadalt/pthreadalt_init.h>
DEF_PTHREADALT_INIT
/* 测试init, fin, ctflinit, ctflfin */

/* 裸机下 */
/* c0: init - coreinit - ... - corefin - fin */
/* c_: coreinit - ... - corefin - fin */
/* 操作系统内 */
/* t0: init - thinit - ... - thfin - fin */
/* t_: thinit - ... - thfin - fin */


/* 测试pthreadalt*/
SYSINIT_FUNC(testinit){
	fprintf(stderr, "test sysinit\n");
}
CFLOWINIT_FUNC(testinit){
	fprintf(stderr, "test threadinit\n");
}
CFLOWFIN_FUNC(testinit){
	fprintf(stderr, "test threadfin\n");
}
SYSFIN_FUNC(testinit){
	fprintf(stderr, "test sysfin\n");
}
// __INITFIN_COMPOSE(sysinit, testinit, __omega)

/* 定义初始化 */
DEF_SYSINIT(testinit)
DEF_CFLOWINIT(testinit)
DEF_CFLOWFIN(testinit)
DEF_SYSFIN(testinit)


int main(){
	// MAPL(__SYSINIT_COMPOSE, GEN_PAIRLIST(testinit, __omega));
	// sys_init();
	// cflow_init();
	return 0;
}
